package com.tourism.dao;

import com.tourism.entity.AttractionOrder;
import com.tourism.entity.AttractionOrderQuery;
import com.tourism.entity.OrderPayInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description 景点订单dao
 * @Author z
 * @Date 2021-04-18 17:00
 */
@Mapper
public interface AttractionOrderDao {
    /**
     * 新增景点订单
     *
     * @param attractionOrder
     * @return
     */
    boolean addAttractionOrder(AttractionOrder attractionOrder);

    /**
     * 根据id查找景点订单
     *
     * @param id
     * @return
     */
    AttractionOrder getAttractionOrderById(Long id);

    /**
     * 根据id删除景点订单
     *
     * @param id
     * @return
     */
    Boolean deleteAttractionOrderById(Long id);
    /**
     * 获取景点订单列表
     *
     * @param query
     * @return
     */
    List<AttractionOrder> getAttractionOrderList(AttractionOrderQuery query);

    /**
     * 更新支付状态
     *
     * @param orderPayInfo
     * @return
     */
    boolean updateOrderPayInfo(OrderPayInfo orderPayInfo);

    /**
     * 更新评价状态状态
     *
     * @param evaluation
     * @param id
     * @return
     */
    boolean updateEvaluation(@Param("evaluation") boolean evaluation, @Param("id") Long id);


}
